package cn.learn.controller;

import cn.learn.service.IMessageProvider;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.UUID;

/**
 * @author huangyezhan
 * @version 1.0
 * @date 2020年12月22日0:57
 */
@RestController
public class SendMessageController {

    @Resource
    private IMessageProvider messageProvider;

    /**
     * 发送消息
     * @return  是否发送成功，true成功
     */
    public boolean sendMessage(){
        String s = UUID.randomUUID().toString();
        return messageProvider.send();
    }

}
